package com.adan.base.execption;

/**
 * @version: 1.0
 * @Author: adan
 * @description: 自定义异常类
 * @date: 2023-06-01 14:20
 */
public class XcPlusException extends RuntimeException{
    private String errMessage;

    public XcPlusException(){
        super();
    }

    public XcPlusException(String errMessage) {
        super(errMessage);
        this.errMessage = errMessage;
    }

    public String getErrMessage() {
        return errMessage;
    }

    public static void cast(CommonError commonError){
        throw new XcPlusException(commonError.getErrMessage());
    }
    public static void cast(String errMessage){
        throw new XcPlusException(errMessage);
    }


}
